home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / awe2-0_1.lha / awe2-0.1 / Src / HardwareContextP-ns32k.h < prev    next >
C/C++ Source or Header  |  1990-07-09  |  852b  |  42 lines

  1. // This may look like C code, but it is really -*- C++ -*-
  2. // 
  3. // Copyright (C) 1988 University of Illinois, Urbana, Illinois
  4. // Copyright (C) 1989 University of Colorado, Boulder, Colorado
  5. // Copyright (C) 1990 University of Colorado, Boulder, Colorado
  6. //
  7. // written by Dirk Grunwald (grunwald@foobar.colorado.edu)
  8. //
  9. #ifndef    HardwareContextP_h
  10. #define    HardwareContextP_h
  11. #pragma once
  12.  
  13. #include "HardwareContext.h"
  14.  
  15. inline void **
  16. HardwareContext::mallocAt()
  17. {
  18.     return( stackMallocAt );
  19. }
  20.  
  21. static inline long
  22. HardwareContext::maxStackDepth()
  23. {
  24.     return( long(stackMax) );
  25. }
  26.  
  27. static inline void
  28. HardwareContext::switchContext(HardwareContext *to)
  29. {
  30.     if ( checkStackLimits ) {    // check old context
  31.     checkStack();
  32.     }
  33.  
  34.     magicSwitchTo(to);
  35.  
  36.     if ( checkStackLimits ) {    // check new context
  37.     checkStack();
  38.     }
  39. }
  40.  
  41. #endif    HardwareContextP_h
  42.